<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>JavaScript 数字 </title>
</head>
<body>

<p>书写 JavaScript 数值既可以带小数点，也可以不带;超大或超小的数可通过科学计数法来写：</p>

<p id="demo"></p>

<script>
  var x = 3.14;
  var y = 3;
  var z = 123e5;    // 12300000
  var t = 123e-5;   // 0.00123
  document.getElementById("demo").innerHTML = x + "<br>" + y+ "<br>" + z+ "<br>" + t;
</script>

</body>
</html>

<!--
输出结果：
3.14
3
12300000
0.00123
-->